# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-lg-m216
pkgdesc="LG K10 (m216)"
pkgver=8
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
options="!check !archcheck"
depends="postmarketos-base mkbootimg linux-postmarketos-qcom-msm8916
	 soc-qcom-msm8916 soc-qcom-msm8916-rproc"
makedepends="devicepkg-dev"
source="deviceinfo modules-initfs"
subpackages="
	$pkgname-nonfree-firmware:nonfree_firmware
"
_pmb_select="soc-qcom-msm8916-rproc"

build() {
	devicepkg_build $startdir $pkgname
}

package() {
	devicepkg_package $startdir $pkgname
}

nonfree_firmware() {
	pkgdesc="GPU/WiFi/BT/Modem/Video firmware"
	depends="firmware-qcom-adreno-a300 msm-firmware-loader
		 firmware-qcom-msm8916-wcnss firmware-lg-m216-wcnss-nv
		 firmware-qcom-msm8916-venus"
	mkdir "$subpkgdir"
}

sha512sums="
c7332c140f36c8655ae5a808864265b6be891c91f82d17b3150cab4916d4d201c5c918e66aca5434279c3cf196d7accbd13e1cd5ff2eac8c6872ee70fe19f128  deviceinfo
d4d77f5db6e361d723c7202bf68342970bc568d6e040b3fba694c5ff0af0eec0a6aaaf582fd6b40a5ab46a26931edacea3cba70e7f6d13be42e9676a5ee06d86  modules-initfs
"
